home *** CD-ROM | disk | FTP | other *** search
- Path: news.glink.net.hk!news
- From: ytchoi@glink.net.hk (╝vñl)
- Newsgroups: comp.lang.c++
- Subject: Re: Trouble with "system" function in BC++ 3.0
- Date: 6 Feb 1996 14:22:26 GMT
- Organization: Anywhere .........
- Message-ID: <4f7o72$phg@unix2.glink.net.hk>
- References: <DMCG2B.LH0@isc.mew.co.jp>
- NNTP-Posting-Host: dialup122.glink.net.hk
- Mime-Version: 1.0
- Content-Type: Text/Plain; charset=US-ASCII
- X-Newsreader: WinVN 0.99.6
-
- In article <DMCG2B.LH0@isc.mew.co.jp>, tomio@ai.mew.co.jp says...
- >
- >I am trying to create a very simple .EXE file which will invoke a DOS
- >EXE command. I am using the "system" function in BC++ 3.0.
- >
- >The problem I am having is that while my .cpp file compiles okay, the
- >linker returns an error.
- >
- >Here's the source (I added a call to the "swab" function just to
- >verify that my project can find the run time library):
- >------------------------------------------------------
- >#include <stdlib.h>
- >#include <stdio.h>
- >#include <string.h>
- >
- >char source[15] = "rFna koBlrna d";
- >char target[15];
- >
- >int main(void)
- >{
- > printf("About to spawn command.com and run a DOS command\n");
- > swab(source, target, strlen(source));
- > printf("This is target: %s\n", target);
- > system("dir");
- > return 0;
- >}
- >
- >
- >Here's the warning/error messages:
- >----------------------------------
- >Compiling SYSTEST.CPP:
- >Linking SYSTEST.EXE:
- >Linker Warning: No module definition file specified: using defaults
- >Linker Error: Undefined symbol _system in module SYSTEST.CPP
- >
- >
- >The above code compiles and executes fine if I comment out the line
- >with "system" in it.
- >
- >If possible, please e-mail suggestions to me at:
- >tomio@ai.mew.co.jp
- >
- >Thanks all.
- >
- Are you programming in 16bit-Windows environment? This function seems to be
- not available in this environment.
-
-
-